<?php
// 本文档自动生成，仅供测试运行
class IndexAction extends Action
{
    
    public function index()
    {
        
        $Article = M("article"); // 实例化User对象
        //$condition['state'] = '1';
        // 把查询条件传入查询方法
        //$list=$Article->where($condition)->select();
        $list=$Article->query('select * from __TABLE__ order by show_date desc limit 0,5 ');
        //select * from table limit 0,5


        // 赋值数据集
         $this->assign("list",$list); 
        $this->display();
    }
    
}
?>